<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateIntegralRatioTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('integral_ratio', function (Blueprint $table) {

            $table->id()->autoIncrement()->primary();
            $table->integer('integral')->comment('积分');
            $table->decimal('ratio')->comment('抵扣金额');
            $table->integer('is_disable')->comment('是否启用 0=启用 1=禁用')->default(0);
            $table->integer('num')->comment('抵扣次数');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('integral_ratio');
    }
}
